home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / AIncludes / QD3DShader.a < prev    next >
Encoding:
Text File  |  1998-04-09  |  9.2 KB  |  334 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DShader.a
  3. ;
  4. ;    Contains:    QuickDraw 3D Shader / Color Routines                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    QuickTime 3.0
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__QD3DSHADER__') = 'UNDEFINED' THEN
  19. __QD3DSHADER__ SET 1
  20.  
  21.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  22.     include 'QD3D.a'
  23.     ENDIF
  24.  
  25. ; ******************************************************************************
  26. ; **                                                                             **
  27. ; **                                RGB Color routines                             **
  28. ; **                                                                             **
  29. ; ****************************************************************************
  30.  
  31. ;
  32. ; extern TQ3ColorRGB *Q3ColorRGB_Set(TQ3ColorRGB *color, float r, float g, float b)
  33. ;
  34.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  35.         IMPORT_CFM_FUNCTION Q3ColorRGB_Set
  36.     ENDIF
  37.  
  38. ;
  39. ; extern TQ3ColorARGB *Q3ColorARGB_Set(TQ3ColorARGB *color, float a, float r, float g, float b)
  40. ;
  41.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  42.         IMPORT_CFM_FUNCTION Q3ColorARGB_Set
  43.     ENDIF
  44.  
  45. ;
  46. ; extern TQ3ColorRGB *Q3ColorRGB_Add(const TQ3ColorRGB *c1, const TQ3ColorRGB *c2, TQ3ColorRGB *result)
  47. ;
  48.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  49.         IMPORT_CFM_FUNCTION Q3ColorRGB_Add
  50.     ENDIF
  51.  
  52. ;
  53. ; extern TQ3ColorRGB *Q3ColorRGB_Subtract(const TQ3ColorRGB *c1, const TQ3ColorRGB *c2, TQ3ColorRGB *result)
  54. ;
  55.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  56.         IMPORT_CFM_FUNCTION Q3ColorRGB_Subtract
  57.     ENDIF
  58.  
  59. ;
  60. ; extern TQ3ColorRGB *Q3ColorRGB_Scale(const TQ3ColorRGB *color, float scale, TQ3ColorRGB *result)
  61. ;
  62.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  63.         IMPORT_CFM_FUNCTION Q3ColorRGB_Scale
  64.     ENDIF
  65.  
  66. ;
  67. ; extern TQ3ColorRGB *Q3ColorRGB_Clamp(const TQ3ColorRGB *color, TQ3ColorRGB *result)
  68. ;
  69.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  70.         IMPORT_CFM_FUNCTION Q3ColorRGB_Clamp
  71.     ENDIF
  72.  
  73. ;
  74. ; extern TQ3ColorRGB *Q3ColorRGB_Lerp(const TQ3ColorRGB *first, const TQ3ColorRGB *last, float alpha, TQ3ColorRGB *result)
  75. ;
  76.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  77.         IMPORT_CFM_FUNCTION Q3ColorRGB_Lerp
  78.     ENDIF
  79.  
  80. ;
  81. ; extern TQ3ColorRGB *Q3ColorRGB_Accumulate(const TQ3ColorRGB *src, TQ3ColorRGB *result)
  82. ;
  83.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  84.         IMPORT_CFM_FUNCTION Q3ColorRGB_Accumulate
  85.     ENDIF
  86.  
  87. ;
  88. ; extern float *Q3ColorRGB_Luminance(const TQ3ColorRGB *color, float *luminance)
  89. ;
  90.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  91.         IMPORT_CFM_FUNCTION Q3ColorRGB_Luminance
  92.     ENDIF
  93.  
  94. ; ******************************************************************************
  95. ; **                                                                             **
  96. ; **                                Shader Types                                 **
  97. ; **                                                                             **
  98. ; ****************************************************************************
  99.  
  100.  
  101. ; typedef long                            TQ3ShaderUVBoundary
  102. kQ3ShaderUVBoundaryWrap            EQU        0
  103. kQ3ShaderUVBoundaryClamp        EQU        1
  104.  
  105. ; ******************************************************************************
  106. ; **                                                                             **
  107. ; **                                Shader Routines                                 **
  108. ; **                                                                             **
  109. ; ****************************************************************************
  110.  
  111. ;
  112. ; extern TQ3ObjectType Q3Shader_GetType(TQ3ShaderObject shader)
  113. ;
  114.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  115.         IMPORT_CFM_FUNCTION Q3Shader_GetType
  116.     ENDIF
  117.  
  118. ;
  119. ; extern TQ3Status Q3Shader_Submit(TQ3ShaderObject shader, TQ3ViewObject view)
  120. ;
  121.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  122.         IMPORT_CFM_FUNCTION Q3Shader_Submit
  123.     ENDIF
  124.  
  125. ;
  126. ; extern TQ3Status Q3Shader_SetUVTransform(TQ3ShaderObject shader, const TQ3Matrix3x3 *uvTransform)
  127. ;
  128.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  129.         IMPORT_CFM_FUNCTION Q3Shader_SetUVTransform
  130.     ENDIF
  131.  
  132. ;
  133. ; extern TQ3Status Q3Shader_GetUVTransform(TQ3ShaderObject shader, TQ3Matrix3x3 *uvTransform)
  134. ;
  135.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  136.         IMPORT_CFM_FUNCTION Q3Shader_GetUVTransform
  137.     ENDIF
  138.  
  139. ;
  140. ; extern TQ3Status Q3Shader_SetUBoundary(TQ3ShaderObject shader, TQ3ShaderUVBoundary uBoundary)
  141. ;
  142.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  143.         IMPORT_CFM_FUNCTION Q3Shader_SetUBoundary
  144.     ENDIF
  145.  
  146. ;
  147. ; extern TQ3Status Q3Shader_SetVBoundary(TQ3ShaderObject shader, TQ3ShaderUVBoundary vBoundary)
  148. ;
  149.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  150.         IMPORT_CFM_FUNCTION Q3Shader_SetVBoundary
  151.     ENDIF
  152.  
  153. ;
  154. ; extern TQ3Status Q3Shader_GetUBoundary(TQ3ShaderObject shader, TQ3ShaderUVBoundary *uBoundary)
  155. ;
  156.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  157.         IMPORT_CFM_FUNCTION Q3Shader_GetUBoundary
  158.     ENDIF
  159.  
  160. ;
  161. ; extern TQ3Status Q3Shader_GetVBoundary(TQ3ShaderObject shader, TQ3ShaderUVBoundary *vBoundary)
  162. ;
  163.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  164.         IMPORT_CFM_FUNCTION Q3Shader_GetVBoundary
  165.     ENDIF
  166.  
  167.  
  168. ; ******************************************************************************
  169. ; **                                                                             **
  170. ; **                            Illumination Shader    Classes                         **
  171. ; **                                                                             **
  172. ; ****************************************************************************
  173.  
  174. ;
  175. ; extern TQ3ObjectType Q3IlluminationShader_GetType(TQ3ShaderObject shader)
  176. ;
  177.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  178.         IMPORT_CFM_FUNCTION Q3IlluminationShader_GetType
  179.     ENDIF
  180.  
  181. ;
  182. ; extern TQ3ShaderObject Q3PhongIllumination_New(void )
  183. ;
  184.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  185.         IMPORT_CFM_FUNCTION Q3PhongIllumination_New
  186.     ENDIF
  187.  
  188. ;
  189. ; extern TQ3ShaderObject Q3LambertIllumination_New(void )
  190. ;
  191.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  192.         IMPORT_CFM_FUNCTION Q3LambertIllumination_New
  193.     ENDIF
  194.  
  195. ;
  196. ; extern TQ3ShaderObject Q3NULLIllumination_New(void )
  197. ;
  198.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  199.         IMPORT_CFM_FUNCTION Q3NULLIllumination_New
  200.     ENDIF
  201.  
  202.  
  203. ; ******************************************************************************
  204. ; **                                                                             **
  205. ; **                                 Surface Shader                                 **
  206. ; **                                                                             **
  207. ; ****************************************************************************
  208.  
  209. ;
  210. ; extern TQ3ObjectType Q3SurfaceShader_GetType(TQ3SurfaceShaderObject shader)
  211. ;
  212.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  213.         IMPORT_CFM_FUNCTION Q3SurfaceShader_GetType
  214.     ENDIF
  215.  
  216.  
  217. ; ******************************************************************************
  218. ; **                                                                             **
  219. ; **                                Texture Shader                                 **
  220. ; **                                                                             **
  221. ; ****************************************************************************
  222.  
  223. ;
  224. ; extern TQ3ShaderObject Q3TextureShader_New(TQ3TextureObject texture)
  225. ;
  226.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  227.         IMPORT_CFM_FUNCTION Q3TextureShader_New
  228.     ENDIF
  229.  
  230. ;
  231. ; extern TQ3Status Q3TextureShader_GetTexture(TQ3ShaderObject shader, TQ3TextureObject *texture)
  232. ;
  233.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  234.         IMPORT_CFM_FUNCTION Q3TextureShader_GetTexture
  235.     ENDIF
  236.  
  237. ;
  238. ; extern TQ3Status Q3TextureShader_SetTexture(TQ3ShaderObject shader, TQ3TextureObject texture)
  239. ;
  240.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  241.         IMPORT_CFM_FUNCTION Q3TextureShader_SetTexture
  242.     ENDIF
  243.  
  244.  
  245. ; ******************************************************************************
  246. ; **                                                                             **
  247. ; **                                Texture Objects                                 **
  248. ; **                                                                             **
  249. ; ****************************************************************************
  250.  
  251. ;
  252. ; extern TQ3ObjectType Q3Texture_GetType(TQ3TextureObject texture)
  253. ;
  254.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  255.         IMPORT_CFM_FUNCTION Q3Texture_GetType
  256.     ENDIF
  257.  
  258. ;
  259. ; extern TQ3Status Q3Texture_GetWidth(TQ3TextureObject texture, unsigned long *width)
  260. ;
  261.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  262.         IMPORT_CFM_FUNCTION Q3Texture_GetWidth
  263.     ENDIF
  264.  
  265. ;
  266. ; extern TQ3Status Q3Texture_GetHeight(TQ3TextureObject texture, unsigned long *height)
  267. ;
  268.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  269.         IMPORT_CFM_FUNCTION Q3Texture_GetHeight
  270.     ENDIF
  271.  
  272.  
  273. ; ******************************************************************************
  274. ; **                                                                             **
  275. ; **                                Pixmap Texture                                 **
  276. ; **                                                                             **
  277. ; ****************************************************************************
  278.  
  279. ;
  280. ; extern TQ3TextureObject Q3PixmapTexture_New(const TQ3StoragePixmap *pixmap)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  283.         IMPORT_CFM_FUNCTION Q3PixmapTexture_New
  284.     ENDIF
  285.  
  286. ;
  287. ; extern TQ3Status Q3PixmapTexture_GetPixmap(TQ3TextureObject texture, TQ3StoragePixmap *pixmap)
  288. ;
  289.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  290.         IMPORT_CFM_FUNCTION Q3PixmapTexture_GetPixmap
  291.     ENDIF
  292.  
  293. ;
  294. ; extern TQ3Status Q3PixmapTexture_SetPixmap(TQ3TextureObject texture, const TQ3StoragePixmap *pixmap)
  295. ;
  296.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  297.         IMPORT_CFM_FUNCTION Q3PixmapTexture_SetPixmap
  298.     ENDIF
  299.  
  300.  
  301. ; ******************************************************************************
  302. ; **                                                                             **
  303. ; **                                Mipmap Texture                                 **
  304. ; **                                                                             **
  305. ; ****************************************************************************
  306.  
  307. ;
  308. ; extern TQ3TextureObject Q3MipmapTexture_New(const TQ3Mipmap *mipmap)
  309. ;
  310.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  311.         IMPORT_CFM_FUNCTION Q3MipmapTexture_New
  312.     ENDIF
  313.  
  314. ;
  315. ; extern TQ3Status Q3MipmapTexture_GetMipmap(TQ3TextureObject texture, TQ3Mipmap *mipmap)
  316. ;
  317.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  318.         IMPORT_CFM_FUNCTION Q3MipmapTexture_GetMipmap
  319.     ENDIF
  320.  
  321. ;
  322. ; extern TQ3Status Q3MipmapTexture_SetMipmap(TQ3TextureObject texture, const TQ3Mipmap *mipmap)
  323. ;
  324.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  325.         IMPORT_CFM_FUNCTION Q3MipmapTexture_SetMipmap
  326.     ENDIF
  327.  
  328.  
  329.  
  330.  
  331.  
  332.     ENDIF ; __QD3DSHADER__ 
  333.  
  334.